home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr36 / famedemo.zip / LOGON.QAL < prev    next >
Text File  |  1994-11-19  |  8KB  |  301 lines

  1.  ;==================================================================
  2.  ;
  3.  ; Logon.qal : QAL source file. Qaf is LOGON.QAF
  4.  ; ========
  5.  ;
  6.  ; Originally written by eSoft
  7.  ; Modified by Paul Blitz, John Schachat and Charles Barnett
  8.  ;
  9.  ;
  10.  ;
  11.  ; This QAL is for NEW callers to choose whether they want to
  12.  ; Have ANSI and IBM characters and to set terminal defaults
  13.  ;
  14.  ;
  15.  ;
  16.  ;
  17.  ;=================================================================
  18.  ; QAL DEFINITION
  19.  ;
  20.  ; Logon
  21.  ; ========
  22.  ; Q&A to interactively set user's ANSI & IBM Graphics flags
  23.  ; as well as screen length and width.
  24.  ;
  25.  ; Used both for new users, and as part of the utilities stuff
  26.  ;
  27.  ;
  28.  ;
  29.  ;=================================================================
  30.  
  31.  ;*************
  32.  Q&A: LOGON
  33.  ;*************
  34.  
  35.  Change: ANSI = .                       ; clear both to start with
  36.  Change: IBM  = .
  37.  
  38.  Clear:
  39.  Show: ""
  40.  Show: ""
  41.  Show: ""
  42.  Show: "ANSI Usage:"
  43.  Show: "==========="
  44.  Show: ""
  45.  
  46.  If: %CANANSI% = "X"                    ;auto-check shows ansi capability
  47.  
  48.     Show: "Our system has detected you are capable of supporting "
  49.     Show: "ANSI color and screen location sequences."
  50.  
  51.  Else:
  52.  
  53.     Show: "Your system may be able to use ANSI color and screen location "
  54.     Show: "sequences. Generally, if your emulation is set to ANSI, then you"
  55.     Show: "WILL be able to use ANSI. Certain other terminals / terminal"
  56.     Show: "emulations can also use ANSI."
  57.  
  58.  Endif:
  59.  
  60.  Show: ""
  61.  Show: "(If you are in any doubt whether your system will work properly"
  62.  Show: " ANSI enabled, then press a T now to run a test.)"
  63.  Show: ""
  64.  Show: ""
  65.  Show: ""
  66.  Show: "Would you like to use ANSI: Yes, No or Test it?"
  67.  
  68.  
  69.  Get:  "Please enter Y, N, or T:  ~" TYPE=HOTKEY VAR=Z VALID="YNTynt"
  70.  
  71.  IfCase: %Z% = "Y"                      ;yes, turn ANSI on
  72.     Change: ANSI=X
  73.  EndIf:
  74.  
  75.  IfCase: %Z% = "N"                      ;no, turn ANSI off
  76.     Change: ANSI=.
  77.  EndIf:
  78.  
  79. IfCase: %Z% = "T"                      ;test the ANSI capability
  80.    Change: ANSI=X
  81.    Show: "^[[01;37;40m^[[H^[[2J~"
  82.    Clear:
  83.    Show: ""
  84.    Show: "The following is a test of your capabilities to use ANSI color:"
  85.    Show: ""
  86.    Show: ""
  87.    Show: "   ****  ****  **** "
  88.    Show: ""
  89.    Show: ""
  90.    Show: "The above should have cleared your screen, and displayed 3 sets "
  91.    Show: "of stars. If you have a color screen, then each set of stars"
  92.    Show: "would have been on a different colored background."
  93.    Show: ""
  94.    Show: "(If you saw *ANY* strange sequences like '[01;37;41m' then you"
  95.    Show: "do NOT have an ANSI capability)"
  96.    Show: ""
  97.    Show: ""
  98.    Show: "Did the above test display correctly (Y/N)? "
  99.    Get: "Please enter Y, or N:  ~" TYPE=HOTKEY VAR=Z VALID="YNyn"
  100.  
  101.    IfCase: %Z% = "Y"
  102.      Change: ANSI=X
  103.    Else:
  104.      Change: ANSI=.
  105.    Endif:
  106.  
  107.  Endif:                       ; %Z% = "T" (test the ANSI capability)
  108.  
  109.  
  110.  
  111.  Clear:
  112.  Show: ""
  113.  Show: "IBM Graphics Usage:"
  114.  Show: "==================="
  115.  Show: ""
  116.  Show: "You may now select whether you wish to use IBM graphics"
  117.  Show: "characters (eg box-drawing characters). To do this, you MUST"
  118.  Show: "be running your system with 8-bit data, and NO parity."
  119.  Show: ""
  120.  Show: "If you do NOT choose to use IBM characters, then this bbs will"
  121.  Show: "use equivalent textual characters to draw boxes."
  122.  Show: ""
  123.  Show: "(If you have any doubt about the ability of your system to use"
  124.  Show: "IBM graphics characters, then press a T now to run a test.)"
  125.  Show: ""
  126.  Show: ""
  127.  Show: ""
  128.  Show: "Would you like to use IBM graphics: Yes, No or Test it?"
  129.  Get:  "Please enter Y, N, or T:  ~" TYPE=HOTKEY VAR=Z VALID="YNTynt"
  130.  
  131.  IfCase: %Z% = "Y"                      ;yes, turn IBM on
  132.      Change: IBM=X
  133.  EndIf:
  134.  
  135.  IfCase: %Z% = "N"                      ;no, turn IBM off
  136.      Change: IBM=.
  137.  EndIf:
  138.  
  139.  IfCase: %Z% = "T"                      ;test it, please
  140.  
  141.     Change: IBM=X                       ; need IBM on to test...
  142.     Clear:
  143.     Show: ""
  144.     Show: "The following is a test of your capabilities to display"
  145.     Show: "IBM graphics characters:"
  146.     Show: ""
  147.     Show: "  ┌──────────────────────────────────────┐"
  148.     Show: "  │╔════════════════════════════════════╗│"
  149.     Show: "  │║ Test ░░░░ Test ▒▒▒▒ Test ▓▓▓▓ Test ║│"
  150.     Show: "  │╚════════════════════════════════════╝│"
  151.     Show: "  └──────────────────────────────────────┘"
  152.     Show: ""
  153.     Show: ""
  154.     Show: "The above should have cleared your screen, and displayed the"
  155.     Show: "word  'Test'  four times, separated by patterned rectangles,"
  156.     Show: "inside two boxes, one with a double border, the other with a"
  157.     Show: "single border"
  158.     Show: ""
  159.     Show: "(If you saw strange (or normal) textual characters, then you"
  160.     Show: "do NOT have an IBM Graphics capability)"
  161.     Show: ""
  162.     Show: ""
  163.     Show: "Did the above test display correctly (Y/N)? "
  164.     Get:  "Please enter Y, or N:  ~" TYPE=HOTKEY VAR=Z VALID="YNyn"
  165.  
  166.     IfCase: %Z% = "Y"
  167.       Change: IBM=X
  168.       Show: ""
  169.       Show: ""
  170.       Show: "IBM graphics characters have been turned on."
  171.       Show: ""
  172.  
  173.       Get: "Press any key to continue ... ~" TYPE=HOTKEY VAR=Z
  174.     Else:
  175.       Change: IBM=.      ; test failed
  176.     Endif:               ; %Z% = "Y"
  177.  
  178.  
  179.  Endif:                  ; %Z% = "T" (test for graphics)
  180.  
  181.  
  182.  ;
  183.  ; This will correctly set the user's page length
  184.  ;
  185.  
  186.  Clear:
  187.  Show: ""
  188.  Show: ""
  189.  Show: ""
  190.  Show: "Screen length:"
  191.  Show: "=============="
  192.  Show: ""
  193.  Show: "This test will correctly set the number of lines per page"
  194.  Show: "that your terminal can handle."
  195.  Show: ""
  196.  Get: "Please press a key to start the test...." TYPE=HOTKEY VAR=Z
  197.  
  198.  Change: PageLen=255
  199.  
  200.  ;
  201.  ;
  202.  Show: "30"
  203.  Show: "29"
  204.  Show: "28"
  205.  Show: "27"
  206.  Show: "26"
  207.  Show: "25"
  208.  Show: "24"
  209.  Show: "23"
  210.  Show: "22"
  211.  Show: "21"
  212.  Show: "20"
  213.  Show: "19"
  214.  Show: "18"
  215.  Show: "17"
  216.  Show: "16"
  217.  Show: "15"
  218.  Show: "14"
  219.  Show: "13"
  220.  Show: "12"
  221.  Show: "11"
  222.  Show: "10"
  223.  Show: " 9"
  224.  Show: " 8"
  225.  Show: " 7"
  226.  Show: " 6"
  227.  Show: " 5"
  228.  Show: " 4"
  229.  Show: " 3"
  230.  Show: " 2"
  231.  Get:  " 1       Which number is on the TOP LINE of your screen? ~"
  232.           TYPE=STRING LENGTH=2 VAR=Z
  233.  
  234. IFNUM: %Z%>0
  235.      Change: PageLen=%Z%
  236. ENDIF:
  237.  
  238. IFNUM: %Z%=0
  239.      Change: PageLen=24
  240. ENDIF:
  241.  
  242. ; This makes certain MY ANSI SCREENS won't come back wrapped and garbled
  243.  
  244.  IFNUM: %PAGELEN%<23
  245.      Change: ANSI=.
  246.  ENDIF:
  247.  
  248.  ;
  249.  ; This will correctly set the user's page Width
  250.  ;
  251.  
  252.  Clear:
  253.  Show: ""
  254.  Show: ""
  255.  Show: ""
  256.  Show: "Screen Width:"
  257.  Show: "=============="
  258.  Show: ""
  259.  Show: "This last test will correctly set the number of Columns across"
  260.  Show: "that your terminal can handle."
  261.  Show: ""
  262.  Get: "Please press a key to start the test...." TYPE=HOTKEY VAR=Z
  263.  
  264.  Change: WIDTH=80
  265.  
  266.  ;
  267.  ;
  268.  Show:  "........10........20........30........40........50........60........70.......80"
  269.  
  270.  Show: ""
  271.  Show: ""
  272.  Show: ""
  273.  Get:  "What is the last number on the FAR RIGHT of your screen? ~"
  274.           TYPE=STRING LENGTH=2 VAR=Z
  275.  
  276.  IFNUM: %Z%>0
  277.      Change: WIDTH=%Z%
  278.  ENDIF:
  279.  
  280.  ; This makes certain MY ANSI SCREENS won't come back wrapped and garbled
  281.  
  282.  IFNUM: %WIDTH%<80
  283.      Change: ANSI=.
  284.  ENDIF:
  285.  
  286.  ; Last, but not least, we change the A1(1) flag to indicate that this
  287.  ; is no longer a first time user. This will prevent the user from
  288.  ; hitting this QAL again at logon. You may make this flag anything
  289.  ; you'd like.
  290.  ;
  291.  ; A1(1) = . indicates first time user.
  292.  ; A1(1) = X indicates existing user.
  293.  
  294.  Change: A1=X-------
  295.  
  296.  Quit:
  297.  
  298.  EndQ&A:
  299.  
  300.  ;=================================================================
  301.